import { createApp } from "vue";
import App from "./App.vue";

// 引入路由
import router from "@/router";
// 引入清除默认样式文件
import "@/style/reset.scss";
// import * as ElementPlusIconsVue from "@element-plus/icons-vue";
// 国际化
import ElementPlus from "element-plus";
import zhCn from "element-plus/es/locale/lang/zh-cn";
// 手动导入样式
import "element-plus/es/components/message/style/css";
import { ElMessage } from "element-plus";
import 'element-plus/dist/index.css'
// 引入pinia
import pinia from "@/store";
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// 引入全局组件
import HospitalTop from "@/components/hospital_top/index.vue";
import HospitalBottom from "@/components/hospital_bottom/index.vue";
import Login from "@/components/login/index.vue"
import Visitor from "@/components/visitor/index.vue"
// 引入路由鉴权的文件
import '@/permission'
const app = createApp(App);
app.component("HospitalTop", HospitalTop);
app.component("HospitalBottom", HospitalBottom);
app.component("Login",Login)
app.component('Visitor',Visitor)
app.use(router);
app.use(pinia);
pinia.use(piniaPluginPersistedstate)
app.use(ElementPlus, {
  locale: zhCn,
});
// for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
//   app.component(key, component);
// }
app.mount("#app");
